import request from "@/util/request";

// 老师的课程
export function coursePlan(currentPage, pageSize, tno) {
  return request({
    url: `/course-api/edu/course/infoT/${currentPage}/${pageSize}`,
    method: "get",
    params: {
      tno,
    },
  });
}

export function getCoursePage(currentPage, pageSize) {
  return request({
    url: `/course-api/edu/course/page/${currentPage}/${pageSize}`,
    method: "get",
  });
}

export function delCourse(cno) {
  return request({
    url: `/course-api/edu/course/delete/${cno}`,
    method: "delete",
  });
}

export function searchCourse(cno) {
  return request({
    url: `/course-api/edu/course/info/${cno}`,
    method: "get",
  });
}

export function editCourse(courseForm) {
  return request({
    url: `/course-api/edu/course/update`,
    method: "put",
    data: courseForm,
  });
}

export function addCourse(courseForm) {
  return request({
    url: `/course-api/edu/course/save`,
    method: "post",
    data: courseForm,
  });
}

// 下拉列表
export function getCourseList() {
  return request({
    url: `/course-api/edu/course/list`,
    method: "get",
  });
}
